home *** CD-ROM | disk | FTP | other *** search
/ cyber.net interactivo 6 / cybernetinteractivo06.ISO / demos / kerouac / shared.dxr / 00802_shared ms.ls < prev    next >
Encoding:
Text File  |  1996-02-15  |  2.1 KB  |  110 lines

  1. on startMovie
  2.   global gMRollList, gLastPic, glastRoll, gMode
  3.   set glastRoll to 0
  4.   set gMRollList to linearIntList(3, 16)
  5.   set gLastPic to 0
  6.   if the machineType = 256 then
  7.     set the soundLevel to 5
  8.     updateStage()
  9.   end if
  10.   if voidp(gMode) then
  11.     set gMode to #inter
  12.   end if
  13. end
  14.  
  15. on linearCheck
  16. end
  17.  
  18. on keyDown
  19.   global gMode
  20.   if the movieName contains "splash" then
  21.     nothing()
  22.   else
  23.     if (the key = "l") or (the key = "L") then
  24.       alert("Linear Mode is deactivated in this demo.")
  25.     end if
  26.   end if
  27. end
  28.  
  29. on linearOn
  30.   global gMode
  31.   set gMode to #linear
  32.   alert("Linear Mode On. Click mouse or press the 'L' key to stop self-running.")
  33.   puppetsOff()
  34.   go("bunny", "linear")
  35.   cursor([903, 904])
  36. end
  37.  
  38. on linearOff
  39.   global gMode
  40.   set gMode to #inter
  41.   alert("Linear Mode Off.")
  42.   puppetsOff()
  43.   cursor(4)
  44.   go("main")
  45.   cursor(-1)
  46. end
  47.  
  48. on doLinear movName
  49. end
  50.  
  51. on infoDelay
  52. end
  53.  
  54. on puppetsOff
  55.   repeat with i = 1 to 48
  56.     if the castNum of sprite i <> 0 then
  57.       puppetSprite(i, 0)
  58.       updateStage()
  59.     end if
  60.   end repeat
  61. end
  62.  
  63. on hiliteOn theList
  64.   set spr to getAt(theList, 1)
  65.   puppetSprite(spr, 1)
  66.   set the castNum of sprite spr to getAt(theList, 3)
  67.   updateStage()
  68. end
  69.  
  70. on hiliteOff theList
  71.   set spr to getAt(theList, 1)
  72.   set the castNum of sprite spr to getAt(theList, 2)
  73.   updateStage()
  74.   puppetSprite(spr, 0)
  75. end
  76.  
  77. on linearIntList firstEntry, lastEntry
  78.   set ret to []
  79.   if firstEntry > lastEntry then
  80.     set count to 1
  81.     repeat with i = firstEntry down to lastEntry
  82.       setAt(ret, count, i)
  83.       set count to count + 1
  84.     end repeat
  85.   else
  86.     repeat with i = firstEntry to lastEntry
  87.       addAt(ret, i)
  88.     end repeat
  89.   end if
  90.   return ret
  91. end
  92.  
  93. on wordPlay offst
  94.   set spr to the clickOn
  95.   set rcn to the castNum of sprite spr
  96.   puppetSprite(spr, 1)
  97.   set the castNum of sprite spr to rcn + offst
  98.   updateStage()
  99.   puppetSound(the name of cast (rcn + offst + offst))
  100.   updateStage()
  101.   repeat while soundBusy(1)
  102.     nothing()
  103.   end repeat
  104.   set the castNum of sprite spr to rcn
  105.   updateStage()
  106.   puppetSprite(spr, 0)
  107.   puppetSound(0)
  108.   updateStage()
  109. end
  110.